<?
$help['svn:up'] = 'update sandbox tree';
$opt['svn:up'] = array('branch', 'dir');

function cmd_svn_up($branch, $dir){
    if(!is_branch_dir()) error('You should start update process in branch directory');
    
    echo "\nSVN UP processing...[$branch]\n\n";
    
    label('root');
    do {
        $log = system('svn  up 2>&1', $ret);
    } while ($ret && $keep_trying);
    if($ret){
        echo "\n$log\n=====svn error\n";
        exit;
    }
    get_components('up');
}